package com.neusoft.chatserver.controller;


import com.neusoft.chatserver.dto.MessageQuery;
import com.neusoft.chatserver.dto.RespBean;
import com.neusoft.chatserver.entity.Message;
import com.neusoft.chatserver.service.IMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liuxp
 * @since 2021-07-14
 */

@CrossOrigin
@RestController
@RequestMapping("/chat")
public class MessageController {
    @Autowired
    IMessageService iMessageService;

    @PostMapping("/getTodayMessage")
    RespBean getTodayMessage(@RequestBody MessageQuery messageQuery){
        return iMessageService.getTodayMessage(messageQuery);
    }
}

